package com.itheima.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mapper.CmsPrefrenceAreaMapper;
import com.itheima.pojo.CmsPrefrenceArea;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class CmsPrefrenceAreaImpl implements CmsPrefrenceAreaApi{

    @Autowired
    private CmsPrefrenceAreaMapper mapper;

    /**
     * 获取所有商品优选
     */
    @Override
    public List<CmsPrefrenceArea> listAll() {

        LambdaQueryWrapper<CmsPrefrenceArea> lqw = new LambdaQueryWrapper<>();
        lqw.ne(CmsPrefrenceArea::getId,0);
        List<CmsPrefrenceArea> cmsPrefrenceAreaList = mapper.selectList(lqw);
        return cmsPrefrenceAreaList;
    }

}
